﻿using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace SportsStore.Domain.Enities
{
    public class Product
    {
        [HiddenInput(DisplayValue=false)]
        public int ProductID { get; set; }
        [Required(ErrorMessage = "请输入名称！")]
        public string Name { get; set; }
        [Required(ErrorMessage = "请输入产品描述！")]
        public string Description { get; set; }
        [Required]
        [Range(0.01,double.MaxValue,ErrorMessage = "请输入正确价格！")]
        public decimal Price { get; set; }
        [Required(ErrorMessage = "请指明产品的类别！")]
        public string Category { get; set; }

        public byte[] ImageData { get; set; }
        public string ImageMimeType { get; set; }
    }
}